package cn.chinaflame.pagodas.constant;

import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;

import com.google.common.collect.Lists;



public class Sysconst {
    /**
     * 异常信息统一头信息<br>
     * 非常遗憾的通知您,程序发生了异常
     */
    public static final String Exception_Head = "OH,MY GOD! SOME ERRORS OCCURED! AS FOLLOWS :";
    public static final String LOGIN_SESSION_KEY = "userjsessionid";
    public static final String PROJECT_PAY_USERID = "pagodas";
    public static final String FLOORINSTEADAREA = "楼";
    /*证件类型*/
    public static final String IDTYPE_IDCARD = "1";  //身份证
    public static final String IDTYPE_HK_PASS = "2";  //港澳通行证
    public static final String IDTYPE_MAINLAND = "3";  //往来大陆通行证
    public static final String IDTYPE_PASSPORT = "4";  //护照
    public static final Map<String, String> IdTypeList = new HashMap<>();
    /*代理级别*/
    public static final String AGENT_LEVEL_ONE = "1";  //一级代理
    public static final String AGENT_LEVEL_TWO = "2";  //二级代理
    public static final String AGENT_LEVEL_THREE = "3";  //三级代理
    public static final Map<String, String> AgentLevelList = new HashMap<>();
    /*区域类型*/
    public static final String AREA_TYPE_PROVINCE = "1";  //省级
    public static final String AREA_TYPE_CITY = "2";  //市级
    public static final String AREA_TYPE_COUNTY = "3";  //区县级
    public static final Map<String, String> AreaTypeList = new HashMap<>();
    public static final Map<String, String> CountyList = new HashMap<>();
    public static final Map<String, String> ProvinceList = new HashMap<>();
    public static final Map<String, String> CityList = new HashMap<>();
    public static final Map<String, String> AreaList = new HashMap<>();
    /*启用状态*/
    public static final String ENABLED_TRUE = "0";  //启用
    public static final String ENABLED_FALSE = "1";  //不启用
    /*会员是否注册*/
    public static final String REGIST_TRUE = "1";  //已注册
    public static final String REGIST_FALSE = "0";  //未注册
    /*交易方式*/
    public static final String TRANS_TYPE_CHARGE = "CHARGE";  //充值
    public static final String TRANS_TYPE_CASHOUT = "CASHOUT";  //提现
    public static final String TRANS_TYPE_PAY = "PAY";  //消费
    public static final String TRANS_TYPE_REFUND = "REFUND";  //退款
    public static final List<String> TransTypeList = Lists.newArrayList(TRANS_TYPE_CHARGE, TRANS_TYPE_CASHOUT, TRANS_TYPE_PAY, TRANS_TYPE_REFUND);
    /*支付状态*/
    public static final String PAY_STATUS_WAIT = "0";  //待支付
    public static final String PAY_STATUS_DOING = "1";  //支付中
    public static final String PAY_STATUS_SUC = "2";  //支付完成
    public static final String PAY_STATUS_FAIL = "3";  //支付失败
    public static final String PAY_STATUS_ORDER_TIMEOUT = "4";  //交易超时，15分钟没有收到回调通知
    public static final String PAY_STATUS_PAY_TIMEOUT = "5";  //支付超时，15分钟没有进行支付
    public static final String PAY_STATUS_PART = "6";       //部分支付
    /*支付方式*/
    public static final String PAY_TYPE_FASTBANK = "FASTBANK";  //银行卡快捷支付
    public static final List<String> PayTypeList = Lists.newArrayList(PAY_TYPE_FASTBANK);
    /*性别*/
    public static final String SEX_MAN = "0";  //男
    public static final String SEX_WOMAN = "1";  //女
    /*会员默认密码*/
    public static final String DefaultPwd = "123456";
    /*session 超时时间，毫秒*/
    public static final Long SESSION_TIMEOUT = 30 * 60 * 1000L;
    /*佛龛项目代码*/
    public static final String PROJECT_PAGODA = "PAGODA";
    /*佛龛项目代理登录标识*/
    public static final String USER_PAGODA_AGENT = "PAGODA_AGENT";
    public static final String USER_PAGODA_MEMBER = "PAGODA_MEMBER";
    /*祭拜项目代码*/
    public static final String PROJECT_WORSHIP = "WORSHIP";
    /*下单渠道*/
    public static final String ORDER_CHANNEL_WEBCHAT = "webchat";
    public static final List<String> OrderChannelList = Lists.newArrayList(ORDER_CHANNEL_WEBCHAT);
    /*佛龛订单类型*/
    public static final String ORDER_TYPE_LIGHTS = "1";  //供灯
    public static final String ORDER_TYPE_BLESS = "2";  //祝福
    public static final String ORDER_TYPE_INVITATION = "3";//邀请亲友
    public static final List<String> OrderTypeList = Lists.newArrayList(ORDER_TYPE_LIGHTS, ORDER_TYPE_BLESS, ORDER_TYPE_INVITATION);
    /*祝福状态*/
    public static final String BLESS_STATUS_INVALID = "0";  //无效
    public static final String BLESS_STATUS_UNPAYED = "1";  //待支付完成
    public static final String BLESS_STATUS_USING = "2";   //使用中，祝福中
    public static final String BLESS_STATUS_FINISH = "3";   //祝福完毕
    /*邀请状态*/
    public static final String INVITATION_STATUS_INVALID = "0";  //无效
    public static final String INVITATION_STATUS_UNPAYED = "1";  //待支付完成
    public static final String INVITATION_STATUS_SUCCESS = "2";   //邀请成功
    /*支付接口成功码*/
    public static final String PAY_SUCCESS_CODE = "0000";
    /*支付接口成功码*/
    public static final String PAY_HAS_REGIST_CODE = "0006";
    /*agent root parent value*/
    public static final String TREE_ROOT_PARENT = "ROOT";
    /*new_edition 行列位置状态：0-未安装；1-已安装；2-故障；3-锁定；4-使用中*/
    public static final String POINT_STATUS_UNINSTALL = "0";
    public static final String POINT_STATUS_INSTALLED = "1";
    public static final String POINT_STATUS_BAD = "2";
    public static final String POINT_STATUS_LOCK = "3";
    public static final String POINT_STATUS_USING = "4";
    public static final String POINT_STATUS_LIGHTING = "5";
    public static final List<String> AREAS = Lists.newArrayList();//所有区号
    public static final List<String> POSITIONS = Lists.newArrayList();//所有柱号

    static {
        IdTypeList.put(IDTYPE_IDCARD, "身份证");
        IdTypeList.put(IDTYPE_HK_PASS, "港澳通行证");
        IdTypeList.put(IDTYPE_MAINLAND, "往来大陆通行证");
        IdTypeList.put(IDTYPE_PASSPORT, "护照");
    }

    static {
        AgentLevelList.put(AGENT_LEVEL_ONE, "一级代理");
        AgentLevelList.put(AGENT_LEVEL_TWO, "二级代理");
        AgentLevelList.put(AGENT_LEVEL_THREE, "三级代理");
    }

    static {
        AreaTypeList.put(AREA_TYPE_PROVINCE, "省");
        AreaTypeList.put(AREA_TYPE_CITY, "市");
        AreaTypeList.put(AREA_TYPE_COUNTY, "区");
    }
    public static final int PILLARS = 140;//灯的总柱数，即最大可并发执行的线程数
    public static  int MAXPILLARS = 50;//每个区的最大柱数
    public static final int MINPILLARS = 9;//每个区的最小柱数
    public static final List<String> BADLIGHTSTITLES=Lists.newArrayList("灯号","区位号","检测消息","检测结果","检测日期");//导出Excel坏灯的标题
    
    public static final Map<String, String> EXCELTITLETW = new LinkedHashMap<String,String>(){
		private static final long serialVersionUID = -3279557658855022662L;

	{
    	put("0","设备型号");
    	put("1","區域");
    	put("2","座号");
    	put("3","柱号");
    	put("4","层数");
    	put("5","位数");
    	put("6","總燈數");
    	put("7","灯类型");
    }};
    public static final Map<String, String> EXCELTITLE = new LinkedHashMap<String,String>(){ 
		private static final long serialVersionUID = -1755516334068629179L;
	{
    	put("0","设备型号");
    	put("1","区号");
    	put("2","座号");
    	put("3","柱号");
    	put("4","层数");
    	put("6","位数");
    	put("8","灯类型");
    }};
    

}
